package BinaryOperators;
import BinaryOperators.Function;

public class LogFunction implements Function{
	final int LOG_BASE = 2;
	
	@Override
	public double Execute(double[] args) {
		if(args.length != 1){
			//TODO handle Exception:
			throw new IndexOutOfBoundsException();
		}else 
			return ((Math.log(args[0]))/Math.log(LOG_BASE));
		}	

}
